package com.web.controller;

import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;

@RestController
@Slf4j
public class HelloController {

    @GetMapping("/hello1")
    public String hello1(){
        log.debug("hello1");
        log.info("hello1");
        log.warn("hello1");
        log.error("hello1");
        return "hello1,你好";
    }

    @GetMapping("/hello2")
    public Object hello2(){
        log.info("hello2");
        HashMap<String,Object> map = new HashMap<>();
        map.put("code",201);
        map.put("message","成功了");
        return map;
    }
}
